# -- coding: utf-8 --
# @Time : 2023/3/22 下午8:10
# @Author : guxuan
# @Email : guxuan@qq.com
# @File : HelloMiddle.py
# @Software: PyCharm
# @project: drf21
from django.http import HttpResponse
from django.shortcuts import render
from django.utils.deprecation import MiddlewareMixin
class HelloMiddleware(MiddlewareMixin):
    pass
    # def process_request(self,request):
    #     if request.META.get("REMOTE_ADDR") =='192.168.136.1':
    #         return HttpResponse('黑名单')
    #     return HttpResponse('白名单')
    #
    # def  process_exception(self,request,exception):
    #     return render(request,'404.html')